Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(backend): Expose and use min_confirmations filter to get utxos #2601

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

lmuntaner
Copy link
Contributor

Motivation

The bitcoin API to get utxos exposes a filter for the mininum confirmations of the transaction.

In this PR, I expose this filter in get_all_utxos and use it in the btc_select_user_utxos_fee endpoint.

Changes

  • Add optional parameter min_confirmations to get_all_utxos.
  • Change page for filter parameter for helper get_utxos.
  • Call get_all_utxos with 6 minimum confirmations.

Tests

We can't add integration tests for bitcoin api until pocket-ic supports bitcoin.

@lmuntaner lmuntaner marked this pull request as ready for review October 1, 2024 10:15
@lmuntaner lmuntaner requested a review from a team as a code owner October 1, 2024 10:15
@lmuntaner
Copy link
Contributor Author

@bitdivine please review

@lmuntaner lmuntaner force-pushed the lm-expose-min-confirmations-utxos branch from fddc93b to 6acbb54 Compare October 1, 2024 12:18
Copy link
Member

@bitdivine bitdivine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@lmuntaner lmuntaner merged commit 440aff8 into main Oct 1, 2024
16 checks passed
@lmuntaner lmuntaner deleted the lm-expose-min-confirmations-utxos branch October 1, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants